package com.hutu.service.biz;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.hutu.model.biz.Column;
import com.hutu.model.resp.ResponseVo;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

/**
 * <p>
 * 字段信息 服务类
 * </p>
 *
 * @author admin
 * @since 2023-07-15
 */
@Service
public interface  ColumnService {

    /**
    * 新增
    *
    * @return
    */
    public ResponseVo add(Column column);

    /**
    * 删除
    *
    * @return
    */
    public ResponseVo deleteById(Integer id);

    /**
    * 批量删除
    *
    * @return
    */
    public ResponseVo deleteBatch(List<Integer> ids);

    /**
    * 编辑
    *
    * @return
    */
    public ResponseVo edit(Column column);

    /**
    * 根据ID查找
    *
    * @return
    */
    public ResponseVo findById(Integer id);

    /**
    * 查询列表
    *
    * @return
    */
    public ResponseVo list(Integer current,Integer size,String name);

    /**
    * 数据导出
    *
    * @param response
    * @return
    */
    public ResponseVo export(HttpServletResponse response) throws IOException;

    /**
     * 数据导入
     *
     * @param file
     * @return
     */
    public ResponseVo imp(MultipartFile file) throws IOException;

    /**
     * 根据条件删除
     * @param lambdaQueryWrapper
     */
    void deleteByWrapper(LambdaQueryWrapper<Column> lambdaQueryWrapper);

    /**
     * 根据表ID查询所有字段
     * @param id
     * @return
     */
    List<Column> findByTableId(Integer id);

    List<Column> findByIds(List<Integer> integerList);

}




